package cn.wen.yaling.xo.service;

import cn.wen.yaling.commons.utils.ResultEntity;
import cn.wen.yaling.commons.vo.BlackListAddVO;
import cn.wen.yaling.commons.vo.BlackListUpdateVO;
import com.baomidou.mybatisplus.extension.service.IService;
import cn.wen.yaling.commons.utils.PageUtils;
import cn.wen.yaling.commons.entity.BlackListEntity;

import java.util.List;
import java.util.Map;

/**
 * 
 *
 * @author FY
 * @email 932043654@qq.com
 * @date 2022-08-13 02:07:36
 */
public interface BlackListService extends IService<BlackListEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 通过Ip查询是否加入黑名单
     * @param ip
     * @return
     */
    BlackListEntity getByIP(String ip);

    /**
     * 获取黑名单列表
     * @return
     */
    ResultEntity getBlackList();

    /**
     * 查询黑名单列表
     * @param blackIp
     * @return
     */
    ResultEntity searchBlackList(String blackIp);

    /**
     * 添加黑名单
     * @param black
     * @return
     */
    ResultEntity addBlack(BlackListAddVO black);

    /**
     * 删除Black
     * @param blackIds
     * @return
     */
    ResultEntity deleteBlackByIds(List<Integer> blackIds);

    /**
     * 修改
     * @param black
     * @return
     */
    ResultEntity updateBlackById(BlackListUpdateVO black);
}

